Optimal. Leaf size=35 \[ \frac{B x}{a}-\frac{(A-B) \cos (e+f x)}{f (a \sin (e+f x)+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0485771, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {2735, 2648} \[ \frac{B x}{a}-\frac{(A-B) \cos (e+f x)}{f (a \sin (e+f x)+a)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2648
Rubi steps
\begin{align*} \int \frac{A+B \sin (e+f x)}{a+a \sin (e+f x)} \, dx &=\frac{B x}{a}-(-A+B) \int \frac{1}{a+a \sin (e+f x)} \, dx\\ &=\frac{B x}{a}-\frac{(A-B) \cos (e+f x)}{f (a+a \sin (e+f x))}\\ \end{align*}
Mathematica [B] time = 0.155121, size = 79, normalized size = 2.26 \[ \frac{\left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right ) (2 A+B (e+f x-2))+B (e+f x) \cos \left (\frac{1}{2} (e+f x)\right )\right )}{a f (\sin (e+f x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 65, normalized size = 1.9 \begin{align*} 2\,{\frac{B\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) }{af}}-2\,{\frac{A}{af \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) }}+2\,{\frac{B}{af \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.43761, size = 105, normalized size = 3. \begin{align*} \frac{2 \,{\left (B{\left (\frac{\arctan \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac{1}{a + \frac{a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac{A}{a + \frac{a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.83652, size = 166, normalized size = 4.74 \begin{align*} \frac{B f x +{\left (B f x - A + B\right )} \cos \left (f x + e\right ) +{\left (B f x + A - B\right )} \sin \left (f x + e\right ) - A + B}{a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.03555, size = 109, normalized size = 3.11 \begin{align*} \begin{cases} - \frac{2 A}{a f \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )} + a f} + \frac{B f x \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )}}{a f \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )} + a f} + \frac{B f x}{a f \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )} + a f} + \frac{2 B}{a f \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )} + a f} & \text{for}\: f \neq 0 \\\frac{x \left (A + B \sin{\left (e \right )}\right )}{a \sin{\left (e \right )} + a} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.22262, size = 54, normalized size = 1.54 \begin{align*} \frac{\frac{{\left (f x + e\right )} B}{a} - \frac{2 \,{\left (A - B\right )}}{a{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1\right )}}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]